bedtools coverage split Bam on CDS


./coverageBed -hist -d -split -abam /Volumes/web/whale/ce_bs/Mgo_tophat_v9_90/accepted_hits.bam -b /Volumes/web/cnidarian/oyster.v9.glean.final.rename.CDS.gff > /Volumes/web/cnidarian/MgoTophat_cover_CDS_d_split_A








./coverageBed -split -abam /Volumes/web/whale/ce_bs/Mgo_tophat_v9_90/accepted_hits.bam -b /Volumes/web/cnidarian/oyster.v9.glean.final.rename.CDS.gff > /Volumes/web/cnidarian/MgoTophat_cover_CDS_split_B






./coverageBed -abam /Volumes/web/whale/ce_bs/Mgo_tophat_v9_90/accepted_hits.bam -b /Volumes/web/cnidarian/oyster.v9.glean.final.rename.CDS.gff > /Volumes/web/cnidarian/MgoTophat_cover_CDS_C






./coverageBed -d -split -abam /Volumes/web/whale/ce_bs/Mgo_tophat_v9_90/accepted_hits.bam -b /Volumes/web/cnidarian/oyster.v9.glean.final.rename.CDS.gff > /Volumes/web/cnidarian/MgoTophat_cover_CDS_d_split_D

--
In iplant

http://eagle.fish.washington.edu/cnidarian/TJGR_MgoTophat_coverage_CDS.txt

Iplant output is in SQLshare




RUNNING AGAIN WITH DEPTH
very big






Options: 
 -abamThe A input file is in BAM format.

 -sRequire same strandedness. That is, only counts hits in A that
  overlap B on the _same_ strand.
  - By default, overlaps are counted without respect to strand.

 -SRequire different strandedness. That is, only report hits in A
  that overlap B on the _opposite_ strand.
  - By default, overlaps are counted without respect to strand.

 -histReport a histogram of coverage for each feature in B
  as well as a summary histogram for _all_ features in B.

  Output (tab delimited) after each feature in B:
    1) depth
    2) # bases at depth
    3) size of B
    4) % of B at depth

 -dReport the depth at each position in each B feature.
  Positions reported are one based. Each position
  and depth follow the complete B feature.

 -countsOnly report the count of overlaps, don't compute fraction, etc.

 -splitTreat "split" BAM or BED12 entries as distinct BED intervals.
  when computing coverage.
  For BAM files, this uses the CIGAR "N" and "D" operations 
  to infer the blocks for computing coverage.
  For BED12 files, this uses the BlockCount, BlockStarts,
  and BlockEnds fields (i.e., columns 10,11,12).

Default Output:  
  After each entry in B, reports: 
    1) The number of features in A that overlapped the B interval.
    2) The number of bases in B that had non-zero coverage.
    3) The length of the entry in B.
    4) The fraction of bases in B that had non-zero coverage.